//
//  TradeOperateView.m
//  RedManStock
//
//  Created by lanou3g on 15/8/1.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "TradeOperateView.h"

@implementation TradeOperateView

- (void)awakeFromNib{
    
    [self.addButton addTarget:self action:@selector(addNumber) forControlEvents:UIControlEventTouchUpInside];
    [self.minusButton addTarget:self action:@selector(minusNumber) forControlEvents:UIControlEventTouchUpInside];
}

- (void)addNumber{
    
    if ([self.entrustPriceTF.text length]>0 && [self.stockStrTF.text length]>0) {
        float a=[self.entrustPriceTF.text floatValue]+0.01;
        self.entrustPriceTF.text=[NSString stringWithFormat:@"%.2f",a];
    }
    
}

- (void)minusNumber{
    if ([self.entrustPriceTF.text length]>0 && [self.stockStrTF.text length]>0) {
        float a=[self.entrustPriceTF.text floatValue]-0.01;
        self.entrustPriceTF.text=[NSString stringWithFormat:@"%.2f",a];
    }
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
